from rest_framework.generics import ListAPIView

from apps.meiduo_admin.serializers.user import UserModelSerializer
from apps.meiduo_admin.utils import PageNum
from apps.users.models import User


class UserListView(ListAPIView):
    # 1.指定查询集
    queryset = User.objects.all()
    # 2.指定序列化器
    serializer_class = UserModelSerializer

    # 添加分页类
    pagination_class = PageNum